﻿@namespace MudBlazor.Docs.Examples

<MudStack Row>
    <MudCard>
        <MudCardContent>
            <MudText Align="Align.Center">ReadOnly Form</MudText>
            <MudForm ReadOnly="ReadOnly" Spacing="2">
                <MudTextField T="string" Label="Text" />
                <MudNumericField T="int" Label="Number" />
                <MudDatePicker Label="Date" />
                <MudSwitch T="bool" Label="Switch" />
                <MudCheckBox T="bool" Label="CheckBox" />
                <MudRadioGroup T="string">
                    <MudRadio Value="@("1")">1</MudRadio>
                    <MudRadio Value="@("2")">2</MudRadio>
                </MudRadioGroup>
                <MudForm ReadOnly="NestedReadOnly" Spacing="2">
                    <MudText Align="Align.Center">Nested Form</MudText>
                    <MudTextField T="string" Label="Nested Text" />
                    <MudNumericField T="int" Label="Nested Number" />
                </MudForm>
            </MudForm>
        </MudCardContent>
        <MudCardActions>
            <MudCheckBox @bind-Value="ReadOnly">ReadOnly</MudCheckBox>
            <MudCheckBox @bind-Value="NestedReadOnly">Nested</MudCheckBox>
        </MudCardActions>
    </MudCard>
    <MudCard>
        <MudCardContent>
            <MudText Align="Align.Center">Disabled Form</MudText>
            <MudForm Disabled="Disabled" Spacing="2">
                <MudTextField T="string" Label="Text" />
                <MudNumericField T="int" Label="Number" />
                <MudDatePicker Label="Date" />
                <MudSwitch T="bool" Label="Switch" />
                <MudCheckBox T="bool" Label="CheckBox" />
                <MudRadioGroup T="string">
                    <MudRadio Value="@("1")">1</MudRadio>
                    <MudRadio Value="@("2")">2</MudRadio>
                </MudRadioGroup>
                <MudForm Disabled="NestedDisabled" Spacing="2">
                    <MudText Align="Align.Center">Nested Form</MudText>
                    <MudTextField T="string" Label="Nested Text" />
                    <MudNumericField T="int" Label="Nested Number" />
                </MudForm>
            </MudForm>
        </MudCardContent>
        <MudCardActions>
            <MudCheckBox @bind-Value="Disabled">Disabled</MudCheckBox>
            <MudCheckBox @bind-Value="NestedDisabled">Nested</MudCheckBox>
        </MudCardActions>
    </MudCard>
</MudStack>

@code {
    bool ReadOnly = true;
    bool NestedReadOnly;
    bool Disabled = true;
    bool NestedDisabled;
}